type UserInfo = {
    id: number;
    name: string;
    age: number;
}

export const getUserList = () => {
    return fetchGet<Array<UserInfo>>("/users/list")
}

export const getUserByName = (data: {name: string}) => {
    return fetchGet<UserInfo>("/users/one", data)
}

export const getUserByID = (data: {id: number}) => {
    return fetchPost<UserInfo>("/users/one", data)
}